<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	protected function _initDoctype()
    {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('XHTML1_STRICT');
    }
	
	public function run()
	{
		$this->getApplication()->getAutoloader()->registerNamespace('Blogger_');
		//setup config in registry	
		$config = new Zend_Config($this->getApplication()->getOptions());	
    	Zend_Registry::set('config', $config);
		Zend_Registry::set('db', Blogger_Db::factory($config->database));        
        if (1 == $config->database->profiler)
        	Zend_Registry::get('db')->getProfiler()->setEnabled(1);		    			
				Blogger_Db_Table_Abstract::setDefaultAdapter(Zend_Registry::get('db'));
		parent::run();
	}

}

